package com.ecommerce.model;

public class CategorySales {
    private int categoryId;
    private String categoryName;
    private int quantitySold;
    private double totalRevenue;

    public CategorySales() {}

    // Getters and Setters
    public int getCategoryId() { return categoryId; }
    public void setCategoryId(int categoryId) { this.categoryId = categoryId; }

    public String getCategoryName() { return categoryName; }
    public void setCategoryName(String categoryName) { this.categoryName = categoryName; }

    public int getQuantitySold() { return quantitySold; }
    public void setQuantitySold(int quantitySold) { this.quantitySold = quantitySold; }

    public double getTotalRevenue() { return totalRevenue; }
    public void setTotalRevenue(double totalRevenue) { this.totalRevenue = totalRevenue; }

    @Override
    public String toString() {
        return String.format("分类: %s | 销量: %d | 营收: ¥%.2f",
                categoryName, quantitySold, totalRevenue);
    }
}